<div class="sidebar-second order-navBox">
    <ul id="accordion" class="accordion">
        <li {if condition="in_array($Request.param.c, ['Shop'])"}class="open"{/if}>
            <a class="link">订单管理<i class="fa fa-angle-right"></i></a>
            <ul class="submenu" {if condition="in_array($Request.param.c, ['Shop'])"}style="display: show;"{else/}style="display: none;"{/if}>
                <li>
                    <a {eq name="$Request.param.order_status" value="1"}class="current"{/eq} href='{:url("Shop/index", ["order_status"=>1])}'>
                        待发货
                    </a>
                </li>
                <li>
                    <a {eq name="$Request.param.order_status" value="10"}class="current"{/eq} href='{:url("Shop/index", ["order_status"=>10])}'>
                        待付款
                    </a>
                </li>
                <li>
                    <a {eq name="$Request.param.order_status" value="2"}class="current"{/eq} href='{:url("Shop/index", ["order_status"=>2])}'>
                        已发货
                    </a>
                </li>
                <li>
                    <a {eq name="$Request.param.order_status" value="3"}class="current"{/eq} href='{:url("Shop/index", ["order_status"=>3])}'>
                        已完成
                    </a>
                </li>
                <li>
                    <a {if condition="'index' == $Think.const.ACTION_NAME and '' == $Request.param.order_status"}class="current"{/if} href='{:url("Shop/index")}'>
                        全部订单
                    </a>
                </li>
            </ul>
        </li>
        <li {if condition="in_array($Request.param.c, ['ShopService', 'ShopComment', 'Member'])"}class="open"{/if}>
            <a class="link">订单处理<i class="fa fa-angle-right"></i></a>
            <ul class="submenu" {if condition="in_array($Request.param.c, ['ShopService', 'ShopComment', 'Member'])"}style="display: show;"{else/}style="display: none;"{/if}>
                {if condition="$php_servicemeal >= 2"}
                <li>
                    <a {if condition="'Member' == $Think.const.CONTROLLER_NAME"}class="current"{/if} href='{:url("Member/money_index")}'>
                        充值订单
                    </a>
                </li>
                {/if}
                <li>
                    <a {if condition="'ShopService' == $Think.const.CONTROLLER_NAME"}class="current"{/if} href='{:url("ShopService/after_service")}'>
                        维权订单
                    </a>
                </li>
                {eq name='$usersConfig.shop_open_comment' value='1'}
                <li>
                    <a {if condition="'ShopComment' == $Think.const.CONTROLLER_NAME and in_array($Think.const.ACTION_NAME, ['comment_index', 'comment_add', 'comment_details'])"}class="active"{/if} href='{:url("ShopComment/comment_index")}'>评价管理</a>
                </li>
                {/eq}
            </ul>
        </li>
    </ul>
</div>
<script>
$(function() {
	var Accordion = function(el, multiple) {
		this.el = el || {};
		this.multiple = multiple || false;

		// Variables privadas
		var links = this.el.find('.link');
		// Evento
		links.on('click', {el: this.el, multiple: this.multiple}, this.dropdown)
	};

	Accordion.prototype.dropdown = function(e) {
		var $el = e.data.el;
			$this = $(this);
			$next = $this.next();

		$next.slideToggle();
		$this.parent().toggleClass('open');

		if (!e.data.multiple) {
			$el.find('.submenu').not($next).slideUp().parent().removeClass('open');
		}
	};

	var accordion = new Accordion($('#accordion'), false);
	$('.submenu li').click(function () {
		$(this).addClass('current').siblings('li').removeClass('current');
	});
});
</script>